#ifndef _LIST_CTRL_EX_H__
#define _LIST_CTRL_EX_H__

#include <wx/wxprec.h>
#include <wx/wx.h>
#include <wx/listctrl.h>

#include <AtlasBase.h>
#include <AtlasCommon.h>

class CContentDataView;

class CListCtrlEx :	public wxListCtrl
{
public:
	CListCtrlEx(wxWindow *parent, wxWindowID id, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxLC_ICON);
	virtual ~CListCtrlEx();

	void SetDataView(CContentDataView* view);

	void OnContextMenu(wxContextMenuEvent& event);
	
	void OnMenuNew(wxCommandEvent& (event));
	void OnMenuCopy(wxCommandEvent& (event));
	void OnMenuPaste(wxCommandEvent& (event));
	void OnMenuDel(wxCommandEvent& (event));
	void OnMenuSelAll(wxCommandEvent& (event));
	void OnMenuSave(wxCommandEvent& (event));

	DECLARE_EVENT_TABLE()

protected:
	void ShowContextMenu(const wxPoint& pos);

private:
	CContentDataView* m_pDataView;
};

#endif //_LIST_CTRL_EX_H__